/*
@author : SuoNi
@date : 2021/12/8 21:51
@Mail : suoni1919@gmail.com
@Description:切片类
*/
package main

import "fmt"

func reverse(s []int) {
	for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
		s[i], s[j] = s[j], s[i]
	}
}

func main() {
	a := [...]int{1, 5, 6, 9}
	reverse(a[:])
	fmt.Println(a)

	var runes []rune
	for _, r := range "hello,world" {
		runes = append(runes, r)
	}
	fmt.Printf("%q\n", runes)
}
